home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-04-03 | 6.4 KB | 297 lines | [TEXT/QED1] |
- *
- * File maintenance procedure for The <TBD> BBS
- *
- *
- * Set up control symbols (flags)
- *
- SENDSERIAL "A" "ATH1"
- *
- DEFINE "Special" "NO"
- DEFINE "Launch" "YES" ; Launch RRHost?
- DEFINE "ChkBBS" "NO"
- DEFINE "ChkPaths" "YES"
- DEFINE "SaveTxt" "YES"
- DEFINE "MoveFiles" "YES"
- DEFINE "LoadTxtDate" "99/99" ; Set to current date if file sections
- ; should be loaded from text files.
- DEFINE "AddFolder" "YES" ;
-
- ; Day Of Week : 1 - Sunday ... 7 - Saturday
- DEFINE "DayOfWeek" "@3"
- *
- *
- DEFINE "Default_Level" "0"
- *
- LIST "5" ; For Debug, list Macro execution
- ; Set to "0" to turn off.
- *
- * Define location of BBS (RRHost) and File Sections
- *
- * "BBS" MUST be set if you use partial pathnames!!
- *
- DEFINE "BBS" "Jasmine:BBS" ;
- SHOWSYMBOL "BBS" ; Put into log file for verification.
- *
- *
- DEFINE "where" "" "NO" ; for same folder as FSP.
- DEFINE "where" ":Files" "YES" ; for subdirectory "Files"
- SHOWSYMBOL "where"
- *
- DEFINE "NewsLetter" "where:Sect1:.NLF"
- DEFINE "DLPriv" "where:Sect0:.DLPriv"
- DEFINE "DL1" "where:.DL1"
- DEFINE "Scratch" "where:ScratchSect"
- *
- DEFINE "All_Files_Sect" "where:.DL1" "YES"
- *
- *
- **********************
- * End of Definitions
- **********************
- SKIP "* Daily" "Special-" ; Special Processing?
- *
- LIST "6"
- CLEAR
- READTEXT ":New Files:Uploads.txt"
- ADD ":New Files:Uploads"
- DELETE/DUPS
- PURGE
- CHECKPATH/DELETE "BBS"
- MOVE ":New Files:Latest"
- SAVE ":New Files:Uploads"
- SAVETEXT ":New Files:Uploads.txt"
- END
-
- CLEAR
- READTEXT ":Files:.AppleSSW.txt"
- CHECKPATH/DELETE ":Files:Apple Sys SW"
- ADD/FOLDER ":Files:Apple Sys SW"
- SAVE ":Files:.AppleSSW"
- SAVETEXT ":Files:.AppleSSW.txt"
- *
- CLEAR
- READTEXT ":Files:.AppleDevSW.txt"
- CHECKPATH/DELETE ":Files:Apple Dev SW"
- ADD/FOLDER ":Files:Apple Dev SW"
- SAVE ":Files:.AppleDevSW"
- SAVETEXT ":Files:.AppleDevSW.txt"
- END
- *
- CLEAR
- READTEXT ":New Files:Uploads.txt"
- ADD ":New Files:Uploads"
- DELETE/DUPS
- PURGE
- ADD/FOLDER ":New Files:Latest"
- SORT/DATE
- CHECKPATH/DELETE ":New Files"
- PURGE
- MOVE/UNDER ":New Files"
- SAVE ":New Files:Uploads"
- SAVETEXT ":New Files:Uploads.txt"
- END
- * End of special processing.
- *
- ******************
- * Daily Processing
- ******************
- *
- *
- * Update Uploads Section prior to individual section handling.
- *
- CLEAR
- READTEXT ":New Files:Uploads.txt"
- ADD ":New Files:Uploads"
- DELETE/DUPS
- PURGE
- ADD/FOLDER ":New Files:Latest"
- SORT/DATE
- CHECKPATH/DELETE ":New Files"
- PURGE
- SAVE ":New Files:Uploads"
- SAVETEXT ":New Files:Uploads.txt"
- *
- DEFINE "New_Files_Sect" ":New Files:Uploads"
- *
- *
- DEFINEMACRO "ProcFileSect"
- ; @1 - Section Number
- CONCATENATE "path" "where:Sect" "@1"
- CONCATENATE "nfpath" ":New Files:NF." "@1"
- CONCATENATE "dlsect" "path:.DL" "@1"
- CONCATENATE "txtpth" "where:TextLists:" "@1.txt"
- SHOWSYMBOL "path"
- SHOWSYMBOL "nfpath"
- SHOWSYMBOL "dlsect"
- *
- EQUAL "@3" "Date" "LoadTxtDate"
- SKIP "**" "@3-" ; Skip if LoadTxtDate is not
- ; equal to current date.
- CLEAR
- READTEXT "txtpth"
- SKIP "SAVE"
- **
- LOAD "dlsect"
- SAVE "dlsect Bckup"
- **
- DELETE/DUPS
- SORT/DATE
- CHANGEPATH "path"
- CHECKTYPE
- CHECKPATH "BBS" "ChkBBS"
- CHECKPATH "path" "ChkPaths"
- CHECKPATH/DELETE "nfpath" "ChkPaths"
- ADD/FOLDER "path" "AddFolder"
- ADD/FOLDER "nfpath" ; Always add files in NF folders
- MOVE/UNDER "path" "MoveFiles"
- ADDTO/DELETE ":Files:Going:.Going" "YES"
- MOVE/DELETE ":Files:Going" "YES"
- PURGE
- SAVE "dlsect" "YES"
- SAVETEXT "txtpth" "SaveTxt" ; Save Text form
- SIZE
- ENDMACRO
- *
- * Sort sections in inverse chronological order.
- *
- ProcFileSect "2" ; Applications Section
- ProcFileSect "3" ; Utilities Section
- ProcFileSect "4" ; Games Section
- ProcFileSect "5" ; DA's Section
- ProcFileSect "6" ; Art/Fonts/Music Section
- ProcFileSect "7" ; Text/Documents Section
- ProcFileSect "8" ; Apple Release Section
- ProcFileSect "9" ; Developer's Section
- ProcFileSect "A" ; Mac II Section
- ProcFileSect "B" ; HyperCard Section
- ProcFileSect "C" ; Communications Section
- *
- * Process Deleted files section before All_Files_Sect
- * is updated.
- *
- DEFINE "path" ":Files:Going"
- DEFINE "dlsect" "path:.Going"
- LOAD "dlsect"
- DELETE/NONE ; Clear Delete Flags
- CHECKPATH/DELETE "path" ; If any files are listed in this section
- PURGE ; and aren't in the folder, then delete it
- ; and delete the file off the disk.
- ADD/FOLDER "path" ; Add any files that have been moved into
- ; the folder
- SAVE "dlsect"
- SAVETEXT "dlsect.txt"
- *
- *
- * Set up 'ALL Files' section
- *
- DEFINEMACRO "AddSect"
- ; @1 - Section Number
- CONCATENATE "path" "where:Sect" "@1"
- CONCATENATE "dlsect" "path:.DL" "@1"
- SHOWSYMBOL "dlsect"
- ADD "dlsect"
- ENDMACRO
- *
- CLEAR
- AddSect "C"
- AddSect "B"
- AddSect "A"
- AddSect "9"
- AddSect "8"
- AddSect "7"
- AddSect "6"
- AddSect "5"
- AddSect "4"
- AddSect "3"
- AddSect "2"
- ADD ":Files:Going:.Going"
-
- DELETE/DUPS
- PURGE
- SORT/TITLE
- FORMAT "DEL+TITLE+VERS+SECT:5+SIZEK+DATE+CR+DESC"
- SAVETEXT/FORMAT "where:DL1.Alpha"
- SORT/DATE
- SAVETEXT/FORMAT "where:DL1.Chrono"
-
- SAVE "Scratch" ; Save
- *
- * Determine new entries since last clear of NewFiles.
- SUBTRACT "DL1"
- DELETE/DUPS
- PURGE
- ADDTO "where:.NewFiles" ;
- *
- LOAD "Scratch"
- CHECKPATH/DELETE "BBS"
- SAVE "DL1"
-
- * I.e. find files that are not referenced within RRHost.
-
- CLEAR
- FORMAT "DEL+TITLE+SECT:8+PATH"
- AddSect "2"
- AddSect "3"
- AddSect "4"
- AddSect "5"
- AddSect "6"
- AddSect "7"
- AddSect "8"
- AddSect "9"
- AddSect "A"
- AddSect "B"
- AddSect "C"
- ADD ":New Files:Uploads"
- ADD "NewsLetter"
- ADD "DLPriv"
- SAVETEXT/FORMAT "where:Files by Sect"
- *
- *
- END "Special"
- DELETEFILE "Scratch"
- *
- DELETE/AGE "180"
- DELETE/TOGGLE
- PURGE
- FORMAT "TITLE+DATE+PATH"
- SAVETEXT/FORMAT "where:Old Stuff"
- *
-
- * Sort NewFiles
-
- LOAD "where:.NewFiles"
- SORT/PATH
- SAVE "where:.NewFiles"
-
- * Delete All Newsletter Files Older than 60 days.
- *
- LOAD "NewsLetter"
- SORT/DATE
- DELETE/AGE "60"
- PURGE/DELETE
- SAVE "NewsLetter"
- *
- * Delete All Private Files Older than 10 days.
-
- LOAD "DLPriv"
- SORT/DATE
- DELETE/AGE "10"
- PURGE/DELETE
- SAVE "DLPriv"
- *
- *
- ********************
- * LAUNCH RRHost
- ********************
- *
- SENDSERIAL "A" "ATH0"
- *
- END "Launch-" ; Quit if Launch symbol is not YES or TRUE
- LAUNCH "Jasmine:BBS:Red Ryder Host" "Remote"
- EQUAL/NOT "@3" "4" "DayOfWeek" ; Set @3 to true if not Wed.
- LAUNCH "Jasmine:BBS:Red Ryder Host" "@3"
- LAUNCH "Jasmine:BBS:ArchiveCL" "Remote-" ; Run ArchiveCL on boot
- *
- END
- *
-